<?php
/**
 * 示例
 *
 * @author Zeon <scplay@gmail.com>
 * @date 2018/7/9
 * @copyright PanxSoft Inc.
 */
namespace App\Services\BaiduGeoService;


class GeoApiRespMock
{
    public function geoCodeReverseQuery()
    {
        return $result = [
            "status" => 0,
            "result" => [
                "location"            => [
                    "lng" => 116.32298699999993,
                    "lat" => 39.98342407140365,
                ],
                "formatted_address"   => "北京市海淀区中关村大街27号1101-08室",
                "business"            => "中关村,人民大学,苏州街",
                "addressComponent"    => [
                    "country"       => "中国",
                    "country_code"  => 0,
                    "province"      => "北京市",
                    "city"          => "北京市",
                    "district"      => "海淀区",
                    "adcode"        => "110108",
                    "street"        => "中关村大街",
                    "street_number" => "27号1101-08室",
                    "direction"     => "附近",
                    "distance"      => "7",
                ],
                "pois"                => [],
                "poiRegions"          => [],
                "sematic_description" => "北京远景国际公寓(中关村店)内0米",
                "cityCode"            => 131,
            ],
        ];
    }

    public function getLocationQuery()
    {
        return [
            "status" => 0,
            "result" => [
                "location"      => [
                    "lng" => 113.53882425835,
                    "lat" => 23.176153608582,
                ],
                "precise"       => 1,
                "confidence"    => 80,
                "comprehension" => 99,
                "level"         => "道路",
            ],
        ];
    }

    public function getLocationQueryError()
    {
        return [
            "status"  => 1,
            "msg"     => "Internal Service Error:无相关结果",
            "results" => [],
        ];
    }
}

